import request from '@/http/request'
import QueryString from 'qs'
export function getQuestion(data) {
  return request({
    url: '/review_and_answer_and_post/publish_question',
    method: 'post',
    data,
  })
}

export function getQuestionMyList(data) {
  return request({
    url: '/user/get_posts_list',
    method: 'post',
    data,
  })
}

export function getQuestionDelete(postId) {
  return request({
    url: `/review_and_answer_and_post/delete_question?postId=${postId}`,
    method: 'get',
  })
}


export function getQuestionUpdata(data) {
  return request({
    url: '/review_and_answer_and_post/modify_question',
    method: 'post',
    data,
  })
}

export function getQuestionList(data) {
  return request({
    url: '/review_and_answer_and_post/get_question_list',
    method: 'post',
    data,
  })
}
export function getQuestionAnswer(data) {
  return request({
    url: '/review_and_answer_and_post/answer_question',
    method: 'post',
    data,
  })
}

export function getQuestionAnswerDetail(data) {
  return request({
    url: `/review_and_answer_and_post/get_question_detail?postId=${data.postId}`,
    method: 'get'
  })
}


export function getQuestionDeleteAnswer(answerId) {
  return request({
    url: `/review_and_answer_and_post/delete_answer?answerId=${answerId}`,
    method: 'get',
  })
}


export function getQuestionAnswerAdmin(data) {
  return request({
    url: '/review_and_answer_and_post/review_question',
    method: 'post',
    data,
  })
}


export function getQuestionAnswerAdminList(data) {
  return request({
    url: 'review_and_answer_and_post/review_question_list',
    method: 'post',
    data,
  })
}